/*
 * @Description: 定制班线订单列表数据类型
 * @Author: buwei.huang
 * @Date: 2019-08-22 11:37:54
 * @Last Modified by: buwei.huang
 * @Last Modified time: 2019-09-09 15:53:15
 */

export default class OrderListModel {
  /**
   * @param {String} orderNo 订单编号
   * @param {String} outOrderNo 预约单流水号
   * @param {Number} state 订单状态
   * @param {String} payFee 实付金额
   * @param {Array} btnList 操作按钮数组
   * @param {String} storeName 商铺名称
   * @param {String} orderName 订单名称
   * @param {String} orderNum 订单数量
   * @param {String} orderImgUrl 订单图片
   * @param {String} payment 支付方式
   */
  constructor(
    orderNo,
    outOrderNo,
    state,
    payFee,
    btnList,
    storeName,
    orderName,
    orderNum,
    orderImgUrl,
    payment
  ) {
    this.orderNo = orderNo
    this.outOrderNo = outOrderNo
    this.state = state
    this.payFee = payFee
    this.btnList = btnList
    this.storeName = storeName
    this.orderName = orderName
    this.orderNum = orderNum
    this.orderImgUrl = orderImgUrl
    this.payment = payment
    switch (state) {
      case -2:
        this.stateText = '交易关闭'
        break
      case -1:
        this.stateText = '待支付'
        break
      case 0:
        this.stateText = '已支付'
        break
    }
  }
}
